home *** CD-ROM | disk | FTP | other *** search
- Path: mail2news.demon.co.uk!genesis.demon.co.uk
- From: Lawrence Kirby <fred@genesis.demon.co.uk>
- Newsgroups: comp.lang.c
- Subject: Re: time spent on memory allocation
- Date: Tue, 06 Feb 96 20:17:55 GMT
- Organization: none
- Message-ID: <823637875snz@genesis.demon.co.uk>
- References: <4f68uj$nih@srvr1.engin.umich.edu>
- Reply-To: fred@genesis.demon.co.uk
- X-NNTP-Posting-Host: genesis.demon.co.uk
- X-Newsreader: Demon Internet Simple News v1.27
- X-Mail2News-Path: genesis.demon.co.uk
-
- In article <4f68uj$nih@srvr1.engin.umich.edu>
- cjlin@news-server.engin.umich.edu "Chih-Jen Lin" writes:
-
- >Dear friends :
- >
- >An advantage of pointer is it saves time to pass
- >structure vraiables. However, to allocate and free
- >memory too frequently also takes a lot of time. Comparing to
- >a floating point operation, does this cost much or not ?
- >Hope you can give me some ideas.
-
- On most systems a call to malloc is likely to be much more expensive than
- a floating point operation. What exactly do you have in mind?
-
- --
- -----------------------------------------
- Lawrence Kirby | fred@genesis.demon.co.uk
- Wilts, England | 70734.126@compuserve.com
- -----------------------------------------
-